<?php
/**
 * Author: Administrator
 * Date: 2022/8/3 1:43
 */

namespace DesignPatterns\Behavioral\Specification;


class Not extends AbstractSpecification
{
    protected $spec;

    public function __construct(SpecificationInterface $spec)
    {
        $this->spec = $spec;
    }

    public function isSatisfiedBy(Item $item)
    {
        return !$this->spec->isSatisfiedBy($item);
    }
}